package com.its.common.net.client.handler;

import com.its.common.net.core.dto.GenericNetDTO;
import com.its.common.net.core.handler.BaseGenericHandler;
import com.its.common.net.core.handler.BaseUdpHandler;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.socket.DatagramPacket;

import java.net.InetSocketAddress;

/**
 * @Author xiaxp
 * @Date 9/14/22 23:05
 * @Description
 */
public abstract class BaseUdpClientHandler extends BaseUdpHandler {

    public BaseUdpClientHandler(){
        netHandlerExecutor = ClientHandlerExecutor.getInstance();
    }


    /** 自定义数据的处理过程，也可以异步处理
     * @param ctx 通道处理器上下文
     * @param data 字节数组
     */
    @Override
    public abstract void handleData(ChannelHandlerContext ctx, GenericNetDTO<DatagramPacket> data);
}